package com.ruoyi.platform.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.platform.mapper.TbVehicleMapper;
import com.ruoyi.platform.domain.TbVehicle;
import com.ruoyi.platform.service.ITbVehicleService;

/**
 * 车机端更新Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TbVehicleServiceImpl implements ITbVehicleService 
{
    @Autowired
    private TbVehicleMapper tbVehicleMapper;

    /**
     * 查询车机端更新
     * 
     * @param driverId 车机端更新主键
     * @return 车机端更新
     */
    @Override
    public TbVehicle selectTbVehicleByDriverId(Long driverId)
    {
        return tbVehicleMapper.selectTbVehicleByDriverId(driverId);
    }

    /**
     * 查询车机端更新列表
     * 
     * @param tbVehicle 车机端更新
     * @return 车机端更新
     */
    @Override
    public List<TbVehicle> selectTbVehicleList(TbVehicle tbVehicle)
    {
        return tbVehicleMapper.selectTbVehicleList(tbVehicle);
    }

    /**
     * 新增车机端更新
     * 
     * @param tbVehicle 车机端更新
     * @return 结果
     */
    @Override
    public int insertTbVehicle(TbVehicle tbVehicle)
    {
        return tbVehicleMapper.insertTbVehicle(tbVehicle);
    }

    /**
     * 修改车机端更新
     * 
     * @param tbVehicle 车机端更新
     * @return 结果
     */
    @Override
    public int updateTbVehicle(TbVehicle tbVehicle)
    {
        tbVehicle.setUpdateTime(DateUtils.getNowDate());
        return tbVehicleMapper.updateTbVehicle(tbVehicle);
    }

    /**
     * 批量删除车机端更新
     * 
     * @param driverIds 需要删除的车机端更新主键
     * @return 结果
     */
    @Override
    public int deleteTbVehicleByDriverIds(Long[] driverIds)
    {
        return tbVehicleMapper.deleteTbVehicleByDriverIds(driverIds);
    }

    /**
     * 删除车机端更新信息
     * 
     * @param driverId 车机端更新主键
     * @return 结果
     */
    @Override
    public int deleteTbVehicleByDriverId(Long driverId)
    {
        return tbVehicleMapper.deleteTbVehicleByDriverId(driverId);
    }
}
